<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DAPP</title>
    <link href="css/style.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/clipboard.min.js"></script>
</head>
<body>
    <div id="app">
        <div class="bg">
          <img src="images/bg_01.png" />
          <img src="images/bg_02.png" />
          <img src="images/bg_03.png" />
          <img src="images/bg_04.png" />
        </div>
        <div class="contentMain">
        <div class="top">
          <div class="wrap">
            <div class="logo">
              <img src="images/logo.png">
            </div>
            <div class="logoTxt">
              <img src="images/logo_txt.png">
            </div>
            <div class="text">AN OPEN SOURCE BLOCKCHAIN GAME JUST ENJOY IT</div>
            <div class="line">2020/09/01 HERE WE GO</div>
            <div class="menu">
              <i></i>
              <ul class="menuMore" style="display:none;">
                <li class="active"><i class="cn"></i>中文</li>
                <li><i class="en"></i>English</li>
              </ul>
            </div>
          </div>
        </div>
    
        <div class="chartBox">
          <div class="wrap">
            <div class="per">
              <div class="box">
                <h4 id="ssbz">0</h4>
                <p>盛世宝藏</p>
                <div class="chart">
                  <div id="chart1"></div>
                </div>
              </div>
            </div>
            <div class="per">
              <div class="box">
                <h4 ic="qyc">0</h4>
                <p>签约池</p>
                <div class="chart">
                  <div id="chart2"></div>
                </div>
              </div>
            </div>
            <div class="per">
              <div class="box">
                <h4 id="ycc">0</h4>
                <p>溢出池</p>
                <div class="chart">
                  <div id="chart3"></div>
                </div>
              </div>
            </div>
            <div class="per">
              <div class="box">
                <h4 id="rgjc">0</h4>
                <p>日冠军池</p>
                <div class="chart">
                  <div id="chart4"></div>
                </div>
              </div>
            </div>
          </div>
        </div>
    
        <div class="infoBox">
          <div class="wrap">
            盛世宝藏24小时开一次奖，宝藏50%将给予最后100名签约地址，宝藏50%将给予全网V级团队，每有一枚新签约ETH，时间将延长3个时。
          </div>
        </div>
        <div class="tit_join">
          <img src="images/tit_join.png">
        </div>
        <div class="mainBox">
          <div class="wrap">
            <div class="per">
              <div class="box signBox">
                <h2>我的收益</h2>
                <div class="text">
                  <p>签约币种<input type="text" id="amt_6"/><span class="lab">ETH</span></p>
                  <p>已结算静态收益<span class="lab"><b id="yjsjtsy">0</b>ETH</span></p>
                  <p>已结算推广收益<span class="lab"><b id="yjstgsy">0</b>ETH</span></p>
                  <p>离出局剩余收益<span class="lab"><b id="lcjsysy">0</b>ETH</span></p>
                </div>
                <div class="count">
                  <p>可结算收益<span class="lab"><b id="kjssy">0</b>ETH</span></p>
                  <p>可提现收益<span class="lab"><b id="ktxsy">0</b>ETH</span></p>
                </div>
                <div class="iconBox">
                  <div class="icon1"></div>
                  <div class="icon2"></div>
                </div>
                <div class="settlement"><a href="javascript:;" id="settle">结算</a></div>
              </div>
            </div>
            <div class="per">
              <div class="box inviteBox">
                <h2>我的邀请</h2>
                <div class="text">
                  <p>我的邀请链接：
                      <span id="myUrl"></span>
                    <span class="lab">
                        <button data-clipboard-target="#myUrl" id="copy">复制</button>
                    </span>
                  <p>邀请人数<input type="text" id="inviteNum" readonly/></p>
                  <p>我的邀请人地址：<span id="inviteurl"></span></p>
                </div>
              </div>
            </div>
            <div class="per">
              <div class="btnBox">
                <a href="javascript:;" id="sign_btn">签约</a>
              </div>
            </div>
            <div class="per">
              <div class="btnBox">
                <a href="javascript:;" id="btn_4">提现</a>
              </div>
            </div>
          </div>
        </div>
        <div class="transRankAll">
          <div class="transductive">
            <div class="wrap">
              <div class="tabTit">
                <div>
                  <span class="active">单日直推</span>
                  <span>历史直推</span>
                </div>
              </div>
              <div class="per">
                <div class="box singleDay">
                  <h2>我的邀请</h2>
                  <h3>单日直推币数</h3>
                  <ul>
                  </ul>
                  <div class="fot">我的单日直推币数: <font id="myday">0</font>ETH</div>
                </div>
              </div>
              <div class="per" style="display:none">
                <div class="box yesterdayBox">
                  <h2><font>昨日直推</font><span>我的昨日直推币数<b id="ztbs">0</b>ETH</span></h2>
                  <h3>昨日直推币数排行</h3>
                  <ul>
                  </ul>
                </div>
              </div>
            </div>
          </div>
    
          <div class="rankResult">
            <div class="wrap">
              <div class="tabTit">
                <div>
                  <span class="active">VIP榜单</span>
                  <span>溢出结果</span>
                  <span>抽奖结果</span>
                  <span>盛世排名</span>
                </div>
              </div>
              <div class="per">
                <div class="box vipRank">
                  <h2>VIP榜单</h2>
                  <h3>全网V级玩家列表</h3>
                  <ul>
                  </ul>
                </div>
              </div>
              <div class="per" style="display: none;">
                <div class="box overflowResults">
                  <h2>溢出结果</h2>
                  <h3>溢出结果榜单</h3>
                  <ul>
                    </ul>
                </div>
              </div>
              <div class="per" style="display: none;">
                <div class="box lotteryBox">
                  <h2>抽奖结果</h2>
                  <h3>抽奖结果榜单</h3>
                  <ul>
                  </ul>
                </div>
              </div>
              <div class="per" style="display: none;">
                <div class="box prosperousRank">
                  <h2>盛世排行</h2>
                  <ul>
                  </ul>
                  <div class="fot">
                    <h5>
                      <span class="wid1" id="qbzdsr">0</span>
                      <span class="wid2" id="dqpm">0</span>
                      <span class="wid3" id="zsr">0<em> ETH</em></span>
                    </h5>
                    <p>
                      <span class="wid1">前百最低投入</span>
                      <span class="wid2">当前排名</span>
                      <span class="wid3">总投入</span>
                    </p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      </div>
      
      
      <script type="text/javascript" src="js/echarts.min.js"></script>
      <script type="text/javascript" src="js/mycharts.js"></script>
    <script type="text/javascript" src="js/ethjs.js"></script>
    <script type="text/javascript" src="js/ethjs-unit.js"></script>
    <script type="text/javascript" src="js/ethjs-util.js"></script>
    <script>
        $('.menu i').bind('click',function(e){
            e.stopPropagation();
            $('.menu .menuMore').toggle();
        })
        $('.menu .menuMore li').bind('click',function(){
            $(this).addClass('active').siblings().removeClass('active');
            $('.menu .menuMore').hide();
        })
        var isPc = true;
        $('.tabTit span').bind('click',function(){
            if(!isPc){
                $(this).addClass('active').siblings('span').removeClass('active');
                $(this).parents('.tabTit').siblings('.per').eq($(this).index()).show().siblings('.per').hide();
            }
        })
        function isPcFun(){
            window.screenWidth = document.body.clientWidth;
            if(window.screenWidth>=1200){
                isPc = true;
                $('#app').addClass('pc').removeClass('mobile');
            }else{
                isPc = false;
                $('#app').removeClass('pc').addClass('mobile');
            }

        }
        
      var eth = new Eth(web3.currentProvider);
      var el = function(id){ return document.querySelector(id); };
        var SimpleStoreABI = [{"constant":true,"inputs":[],"name":"caclSettle","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initbase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"callowner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v20","outputs":[{"name":"addr","type":"address"},{"name":"w9","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"settle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"randReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"shv","outputs":[{"name":"v11","type":"uint8"},{"name":"v13","type":"uint8"},{"name":"v14","type":"uint8"},{"name":"vip1","type":"uint8"},{"name":"vip2","type":"uint8"},{"name":"vip3","type":"uint8"},{"name":"v16","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"parent","type":"address"}],"name":"join","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v21","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"caclWing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v22_vip3","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v22_vip2","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v5","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"v22","outputs":[{"name":"v1","type":"uint256"},{"name":"v3","type":"uint256"},{"name":"v4","type":"uint256"},{"name":"v5","type":"uint256"},{"name":"v6","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v8","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v23","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"store2_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"caclsub","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"store1","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"rewardlevel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"initstore","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"},{"name":"i","type":"uint256"}],"name":"findLevelAddr","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v22_vip1","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"caclAlllevel","outputs":[{"name":"","type":"address[15]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cur","type":"address"},{"name":"amt","type":"uint256"}],"name":"initFirst","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"val","type":"uint256"}],"name":"initOut","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"v4","outputs":[{"name":"v1","type":"uint256"},{"name":"v2","type":"uint256"},{"name":"v13","type":"uint256"},{"name":"v3","type":"address"},{"name":"v4","type":"bool"},{"name":"v5","type":"uint256"},{"name":"v6","type":"uint256"},{"name":"v7","type":"uint256"},{"name":"v8","type":"uint256"},{"name":"v9","type":"uint256"},{"name":"v10","type":"uint256"},{"name":"v11","type":"uint256"},{"name":"v12","type":"uint256"},{"name":"v14","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v16","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"store2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"isRevel","type":"bool"}],"name":"callBaseSend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v17","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"p1","outputs":[{"name":"v1","type":"address"},{"name":"v3","type":"uint256"},{"name":"v4","type":"uint256"},{"name":"v9","type":"uint256"},{"name":"v12","type":"uint256"},{"name":"v10","type":"uint256"},{"name":"v11","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"val","type":"uint256"}],"name":"caclDayAmt","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"m0","type":"uint256"}],"name":"drawblock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v24","outputs":[{"name":"addr","type":"address"},{"name":"w9","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mylow","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v23_amt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"store2_n","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"vnext_15","type":"address[15]"}],"name":"caclLevel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v19","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"v21_amt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"i","type":"uint256"},{"name":"cur","type":"address"},{"name":"amt","type":"uint256"}],"name":"initVip","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"vipcacl","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"tl","type":"address"}],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}];
        var SimpleStore;
        function init(){
            drawCount('chart1','20:00:00','10:10:00','#F85182','#F85182');
            drawStatic('1%');
            drawPercent('chart3','50%','#BC9F6A','#FF8A00');
            drawCount('chart4','30:00:00','09:10:00','#BC9F6A','#0075FF');
            //初始化
            SimpleStore = eth.contract(SimpleStoreABI).at('0x50393e150892b32Ea8d4f2E03bC8e817E57C491F');
            SimpleStore.store2().then(function(setTxHash){
              var e1 = ethUnit.fromWei(setTxHash[0],'ether');
              $('#ssbz').html(String(e1));
            });
            SimpleStore.store1().then(function(setTxHash){
              $('#rgjc').html(String(ethUnit.fromWei(setTxHash[0],'ether')));
            });
            SimpleStore.p1().then(function(valueStored){
              var html = String(ethUnit.fromWei(valueStored[1],'ether'));
              $('#qyc').html(html);
            });
            SimpleStore.store2().then(function(setTxHash){
              var e1 = ethUnit.fromWei(setTxHash[0],'ether');
              SimpleStore.store2_n().then(function(setTxHash){
                var e2 = ethUnit.fromWei(setTxHash[0],'ether');
                el('#ycc').innerHTML = (e1-e2);
              });
            });
            //获取我的收益

            var cash = 0;
            eth.accounts().then(function(accounts) {
              var myUrl = "http://127.0.0.1:5500/index.html?parent="+accounts[0];
              $("#myUrl").html(myUrl);

              SimpleStore.caclSettle({from:accounts[0]}).then(function(valueStored){
                el('#kjssy').innerHTML = String(ethUnit.fromWei(valueStored[0],'ether'));
              });

              SimpleStore.v22(accounts[0]).then(function(valueStored,error){
                var vv1 = String(ethUnit.fromWei(valueStored[1],'ether'));
                
                var vv = String(ethUnit.fromWei(valueStored[2],'ether'));
                el('#yjstgsy').innerHTML = vv;

                var vv2 = String(ethUnit.fromWei(valueStored[3],'ether'));
                el('#yjsjtsy').innerHTML = vv2;

                vv = String(ethUnit.fromWei(valueStored[5],'ether'));
                el('#myday').innerHTML = vv;

                vv = String(ethUnit.fromWei(valueStored[6],'ether'));
                el('#response').innerHTML += "昨日直推币："+vv+"<br/>";

                var inviteNum = String(valueStored[0]);
                $('#inviteNum').val(inviteNum);

                //单日直推列表
                var singleDayUl='';
                for(var x=0;x<len;x++){
                  SimpleStore.findLevelAddr(accounts[0],x).then(function(valueStored){
                    var len = String(valueStored[0]);
                    singleDayUl+='<li>'+len+'</li>';
                    //el('#response').innerHTML += len+"<br/>";
                  });
                }
                $('.singleDay ul').html(singleDayUl);

                var mytotal;
                SimpleStore.v4(accounts[0]).then(function(valueStored){
                  var html = "";
                  for(var val in valueStored){
                    var l = val;
                    if(l=='v1'){
                      break;
                    }
                    if(val==0){
                      mytotal = ethUnit.fromWei(valueStored[val],'ether');
                    }

                    if(val==1){
                      var l = ethUnit.fromWei(valueStored[val],'ether');
                      el('#lcjsysy').innerHTML =(vv1-l);
                    };
                    if(val==2){
                      cash = ethUnit.fromWei(valueStored[val],'ether');
                      el('#ktxsy').innerHTML =l;
                    };

                    if(val==3){
                      el('#inviteurl').innerHTML =valueStored[val];
                    }
                  //   if(val==4)l="是否有效";
                  //   if(val==5)l="充币时间";
                  //   if(val==6)l="上次结算时间";
                  //   if(val==7)l="索引";
                    if(val==8){
                      el('#ztbs').innerHTML =valueStored[val];
                    };
                  //   if(val==9)l="15代小区总币数";
                  //   if(val==10)l="中奖数量";
                  //   if(val==11)l="抽奖次数";
                  //   if(val==12)l="股东等级";
                  //   if(val==13)l="已派发奖的等级";
                  //   if(val==0||val==1||val==2||val==8||val==9||val==10){
                  //     html += l + ":"+ ethUnit.fromWei(valueStored[val],'ether') +"<br/>";
                  //   }else{
                  //     html += l + ":"+ valueStored[val] +"<br/>";
                  //   }
                  }
                  // el('#response').innerHTML = html;
                });
              });
            });

            el('#settle').addEventListener('click', function(){
              //el("#desc").innerHTML = "结算";
                eth.accounts().then(function(accounts) {
                  SimpleStore.settle({from:accounts[0]}).then(function(valueStored,error){
                    el('#response').innerHTML = String(valueStored);
                  });
                });
            });


            el('#sign_btn').addEventListener('click', function(){
              //el("#desc").innerHTML = "签约";
              eth.accounts().then(function(accounts) {
                var s = location.href.split("=");
                var v = s[1];
                if(!v){
                  v = "0x0000000000000000000000000000000000000000";
                }
                var amt = el("#amt_6").value;
                var l = ethUnit.toWei(amt,'ether');
                var g = ethUtil.intToHex(1600000);
                var gr = ethUnit.toWei(60,'gwei');
                SimpleStore.join(v,{from:accounts[0],value:l,gas:g,gasPrice:gr}).then(function(valueStored,error){
                  //el('#response').innerHTML = String(valueStored);
                });
              });
          });

          el('#btn_4').addEventListener('click', function(){
            //el("#desc").innerHTML = "提币";
              eth.accounts().then(function(accounts) {
                var l = ethUnit.toWei(cash,'ether');
                var g = ethUtil.intToHex(80000);
                SimpleStore.drawblock(l,{from:accounts[0],gas:g}).then(function(valueStored,error){
                  //el('#response').innerHTML = String(valueStored);
                });
              });
          });

          // VIP榜单
          SimpleStore.shv().then(function(valueStored){
            var vip1 = String(valueStored[4]);
            var v1 = parseInt(vip1);
            if(v1==0){
              //el('#response').innerHTML = "没有VIP1股东地址<br/>";
            }
            showvip1(0,v1);
          });

          function showvip1(i,v1){
            if(i>v1){
              return;
            }
            SimpleStore.v22_vip1(i).then(function(setTxHash){
                var vipUl = '';
              for(var val in setTxHash){
                  vipUl+='<li>'+setTxHash[val]+'</li>';
                //el('#response').innerHTML += val + ":"+ setTxHash[val] +"<br/>";
                showvip1(++i,v1);
              }
              $('.vipRank ul').html(vipUl);
            });
          }

          // 中奖名单 20
          var awardList='';
          for(var x=0;x<20;x++){
            SimpleStore.v24(x).then(function(setTxHash){
              if(!isZero(setTxHash[0])){
                  awardList += '<li>'+setTxHash[0] +"："+ethUnit.fromWei(setTxHash[1],'ether') +"</li>";
              }
            });
          }
          $('.lotteryBox ul').html(awardList);

          //溢出结果榜单20
          show(0);
          function show(i){
              var overFlowList='';
            if(i>20){
              return;
            } 
            SimpleStore.v23(i).then(function(setTxHash){
                //var html = i+":"+String(setTxHash[0]);
                SimpleStore.v23_amt(i).then(function(setTxHash){
                  //html += ","+String(ethUnit.fromWei(setTxHash[0],'ether'))+"<br/>";
                  overFlowList+='<li>'+String(ethUnit.fromWei(setTxHash[0],'ether'))+'</li>';
                  //el('#response').innerHTML += html;
                  show(++i);
                });
            });
            $('.overflowResults ul').html(overFlowList);
          }

          // 盛世排行榜
            show5(0);
            function show5(i){
                var heydayList='';
              if(i>10){
                return;
              } 
              SimpleStore.v21(i).then(function(setTxHash){
                  //var html = i+":"+String(setTxHash[0]);
                  SimpleStore.v21_amt(i).then(function(setTxHash){
                    //html += ","+String(ethUnit.fromWei(setTxHash[0],'ether'))+"<br/>";
                    heydayList+='<li>'+String(ethUnit.fromWei(setTxHash[0],'ether'))+'</li>';
                    //el('#response').innerHTML += html;
                    show(++i);
                  });
              });
              $('.prosperousRank ul').html(heydayList);
            }


            SimpleStore.mylow().then(function(value){
              el('#qbzdsr').innerHTML = value[0];
              el('#dqpm').innerHTML = value[1];
              el('#zsr').innerHTML = +mytotal;
            });
        }

        $(function(){
            isPcFun();
            init();
        })
        
        window.onresize = function() {
            var res;
            if (res){clearTimeout(res)}
            res = setTimeout(function(){isPcFun();init();},20);
        }; 
        var btns = document.querySelectorAll('button');
        var clipboard = new ClipboardJS(btns);
        clipboard.on('success',function(e){
           alert('复制成功')
        })
    </script>
</body>
</html>